package com.dodayum.controller;

import com.dodayum.service.RealtimeService;
import com.dodayum.vo.RealtimeQueryNew50VO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @version 1.0
 * 备注：
 * @Author BaiYu
 * </br>@Date 2025/2/24 09:04
 */
@RestController
@RequestMapping("/news")
public class NewsController {

    @Resource
    private RealtimeService realtimeService;

    @GetMapping("/getCount")
    public Long getCount(){
        return realtimeService.getCount();
    }

    @GetMapping("/getNew50")
    public List<RealtimeQueryNew50VO> getNew50(){
        return realtimeService.getNew50();
    }

}
